projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a22ebc9
)
pixbuf-engine: Draw mask with Cairo
author
Benjamin Otte
<otte@redhat.com>
Thu, 15 Jul 2010 13:44:24 +0000
(15:44 +0200)
committer
Benjamin Otte
<otte@redhat.com>
Mon, 26 Jul 2010 14:42:47 +0000
(16:42 +0200)
No more gdk_pixbuf_render_threshold_alpha()
modules/engines/pixbuf/pixbuf-render.c
patch
|
blob
|
history
diff --git
a/modules/engines/pixbuf/pixbuf-render.c
b/modules/engines/pixbuf/pixbuf-render.c
index d074f64c912f61320dd762fe733386873696bc78..c05832da34d8b36149882891f8c02d52f0351f69 100644
(file)
--- a/
modules/engines/pixbuf/pixbuf-render.c
+++ b/
modules/engines/pixbuf/pixbuf-render.c
@@
-479,16
+479,20
@@
pixbuf_render (GdkPixbuf *src,
{
cairo_t *cr;
- cr = gdk_cairo_create (window);
if (mask)
{
- gdk_pixbuf_render_threshold_alpha (tmp_pixbuf, mask,
- x_offset, y_offset,
- rect.x, rect.y,
- rect.width, rect.height,
- 128);
+ cr = gdk_cairo_create (mask);
+
+ gdk_cairo_set_source_pixbuf (cr, tmp_pixbuf,
+ -x_offset + rect.x,
+ -y_offset + rect.y);
+ gdk_cairo_rectangle (cr, &rect);
+ cairo_fill (cr);
+
+ cairo_destroy (cr);
}
+ cr = gdk_cairo_create (window);
gdk_cairo_set_source_pixbuf (cr,
tmp_pixbuf,
-x_offset + rect.x,